# --*-- coding:utf-8 --*--
import os

from BasicAPI.basic_API import BasicAPI
from src import TestCaseMore
from src import Config as config
from src import Public as pb


class TestEVS(TestCaseMore, BasicAPI):
	DATA_PATH = os.path.join(config.project_dir, "Data")
	describe = ""

	def test_imageQuery_image_list_page(self):
		# 读文件
		kwargs = pb.get_data_from_excel(os.path.join(self.DATA_PATH, "test_data.xlsx"), "query", idx=2)
		self.describe = kwargs.get("describe")

		# 发请求
		response = self.imageQuery_image_list_page(login_name="201811000228", **kwargs)

		# 断言
		expected = eval(kwargs.get("expected"))
		self.assertEqual(response.get("ok"), expected.get("ok"),
						 msg=f"查询结果与预期不一致，预期：{expected.get('ok')}, 查询结果：{response.get('ok')}", log_level="error")


if __name__ == '__main__':
	pass
